<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>
<script>
    $(function () {
        //去掉alert域名显示
        window.alert = function(text) {
            //实现alert效果
            var div = document.createElement("div");
            div.style.backgroundColor = " #22b9ff";
            div.style.color = " #fff";
            div.style.position = " fixed";
            div.style.zIndex = 9999999;
            div.style.height = " 60px";
            div.style.top = " 10%";
            div.style.left = "40%";
            div.style.lineHeight = " 60px";
            div.style.borderRadius = " 4px";
            div.style.fontSize = " 17px";
            div.style.textAlign = "center";
            div.style.padding = "0 10px";
            div.className = "animated  bounceInDown";
            div.id = "alert";
            div.innerHTML = text;
            document.getElementsByTagName("body")[0].appendChild(div);
            var selfObj = document.getElementById("alert");
            //动态调整位置
            var alertWidth = window.getComputedStyle(selfObj, null).width;
            div.style.marginLeft = -parseInt(alertWidth) / 2 + "px";
            setTimeout(function() {
                document.getElementsByTagName("body")[0].removeChild(div);
            }, 3000);
        }
        function begin(){
            dicefun.init();
        }

        var message = '${message}';
        if(message!=null && message!="") {
            alert(message);
        }
    })

</script>
<script>
    $(function () {
        var number = ${li_number};
        var active_li = $("#li"+${li_number});
        if(${li_number!=null}){
            active_li.attr("class","active");
        }else {
            var active_li = $("#li0");
            active_li.attr("class","active");
        }
    })
</script>
<aside class="col-sm-3 col-md-2 col-lg-2 sidebar">
    <ul class="nav nav-sidebar">
        <li id="li0"><a href="<%=request.getContextPath()%>/back/main">报告</a></li>
    </ul>
    <ul class="nav nav-sidebar">
        <li id="li1"><a href="<%=request.getContextPath()%>/back/article">文章</a></li>
        <li id="li2"><a href="<%=request.getContextPath()%>/back/notice">公告</a></li>
        <li id="li3"><a href="<%=request.getContextPath()%>/back/comment">评论</a></li>
        <li id="li4"><a data-toggle="tooltip" data-placement="bottom" title="网站暂无留言功能">留言</a></li>
    </ul>
    <ul class="nav nav-sidebar">
        <li id="li5"><a href="category.html">栏目</a></li>
        <li id="li6"><a class="dropdown-toggle" id="otherMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">其他</a>
            <ul class="dropdown-menu" aria-labelledby="otherMenu">
                <li id="li7"><a href="flink.html">友情链接</a></li>
                <li><a data-toggle="modal" data-target="#areDeveloping">访问记录</a></li>
            </ul>
        </li>
    </ul>
    <ul class="nav nav-sidebar">
        <li><a class="dropdown-toggle" id="userMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">用户</a>
            <ul class="dropdown-menu" aria-labelledby="userMenu">
                <li><a data-toggle="modal" data-target="#areDeveloping">管理用户组</a></li>
                <li><a href="manage-user.html">管理用户</a></li>
                <li role="separator" class="divider"></li>
                <li><a href="loginlog.html">管理登录日志</a></li>
            </ul>
        </li>
        <li><a class="dropdown-toggle" id="settingMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">设置</a>
            <ul class="dropdown-menu" aria-labelledby="settingMenu">
                <li><a href="setting.html">基本设置</a></li>
                <li><a href="readset.html">阅读设置</a></li>
                <li role="separator" class="divider"></li>
                <li><a data-toggle="modal" data-target="#areDeveloping">安全配置</a></li>
                <li role="separator" class="divider"></li>
                <li class="disabled"><a>扩展菜单</a></li>
            </ul>
        </li>
    </ul>
</aside>